package com.qf.day11;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo1 {
    public static void main(String[] args) {
        Collection<String> c1=new ArrayList<>();
        System.out.println(c1);
        //add添加
        boolean add = c1.add("5");
        c1.add("55");
        c1.add("11");
        System.out.println(add);
        System.out.println(c1);
        //addAll()添加集合
        Collection<String> c2=new ArrayList<>();
        c2.add("fkfk");
        c2.add("kgk");
        c1.addAll(c2);
        System.out.println(c1);
        //contains包不包含
        System.out.println(c1.contains("fkfk"));
        System.out.println(c1.contains("fkfk1"));
        //containsAll
        System.out.println(c1.containsAll(c2));


    }
}
